<template>
  <div :class="prefix + '-footer'">
    <p class="links">
      <t-link href="https://www.julycms.com" target="_blank">官网</t-link>
      <t-link href="https://www.julycms.com/getting-started.html" target="_blank">帮助</t-link>
    </p>
    <p>
      copyright &copy; {{ copyYear }} julycms.com | 基于
      <t-link href="https://tdesign.tencent.com/starter/docs/vue-next/get-started" target="_blank">
        TDesign Starter {{ pgk.version }}</t-link
      >开发
    </p>
  </div>
</template>

<script setup lang="ts">
import dayjs from 'dayjs';
import { ref } from 'vue';

import { prefix } from '@/config/global';

import pgk from '../../../package.json';

const copyYear = ref('2024');
const curYear = dayjs().year();
if (curYear > 2024) {
  copyYear.value = `${copyYear.value}-${curYear}`;
}
</script>

<style lang="less" scoped>
.@{starter-prefix}-footer {
  color: var(--td-text-color-placeholder);
  line-height: 20px;
  text-align: center;
}
.links .t-link {
  margin: 0 10px;
  font-weight: normal;
}
</style>
